import { createRouter, createWebHashHistory, createWebHistory, RouteRecordRaw } from "vue-router";

// 路由配置 和以前vue2一样
const routes: RouteRecordRaw[] = [
    {
        path: "/",
        name: "首页",
        meta: {
            title: "首页",
        },
        component: () => import("../pages/home"),
        children: [],
    },
    {
        path: "/strategy",
        name: "策略回测",
        meta: {
            title: "策略回测",
        },
        component: () => import("../pages/strategy"),
        children: [],
    },
    {
        path: "/manualTrading",
        name: "手动交易",
        meta: {
            title: "手动交易",
        },
        component: () => import("../pages/manualTrading"),
        children: [],
    },
    {
        path: "/chainData",
        name: "K线与链上数据",
        meta: {
            title: "K线与链上数据",
        },
        component: () => import("../pages/chainData"),
        children: [],
    },
    {
        path: "/help",
        name: "帮助",
        meta: {
            title: "帮助",
        },
        component: () => import("../pages/help"),
        children: [],
    },
]

const router = createRouter({
    // history: createWebHashHistory(),  //浏览器地址带#号
    history: createWebHistory(),
    routes,
});

export default router;